package com.jinyi.wwdeng.ui.permission.adapter

import androidx.recyclerview.widget.RecyclerView
import com.jinyi.lib_baseadapter.BGARecyclerViewAdapter
import com.jinyi.lib_baseadapter.BGAViewHolderHelper
import com.jinyi.wwdeng.R
import org.json.JSONObject

/**
 * JinYiTest
 * @Author wwdeng
 * @CreateTime: 2024/4/16 16:00
 * @Annotation：权限描述适配器
 */
class PermissionAdapter(recyclerView: RecyclerView?) : BGARecyclerViewAdapter<JSONObject>(recyclerView, R.layout.item_permission) {

    override fun setItemChildListener(helper: BGAViewHolderHelper, viewType: Int) {
        helper.setItemChildClickListener(R.id.itemLayout) //点击Item
    }
    override fun fillData(helper: BGAViewHolderHelper, position: Int, model: JSONObject) {
        helper.setText(R.id.tvTitle,model.optString("title"))
        helper.setText(R.id.tvDes,model.optString("des"))
    }
}